DIR=../doink-ftp/subdomains/verb-o-matic/httpdocs


all: publish-source

publish-source:
	echo ${DIR}
	#cp *.html ${DIR}
	cp *.css ${DIR}
	cp *.php ${DIR}
	cp *.js ${DIR}
	#cp *.png ${DIR}

publish-project: publish-all-text publish-source

publish-all-text: publish-adeo publish-latinum publish-greek-verbs publish-kantharos publish-ipa

publish-adeo:
	mkdir -p ${DIR}/adeo
	cp adeo/*.txt ${DIR}/adeo/

publish-latinum:
	mkdir -p ${DIR}/latinum
	cp latinum/*.txt ${DIR}/latinum/

publish-greek-verbs:
	mkdir -p ${DIR}/greek_verbs
	cp greek_verbs/*.txt ${DIR}/greek_verbs/

publish-kantharos:
	mkdir -p ${DIR}/kantharos
	cp kantharos/*.txt ${DIR}/kantharos/
	
split-kantharos:
	for i in `seq -w 1 59`; \
	do \
	  grep "^L $$i	" < Kantharos.prepared.txt  | cut -f2,3,4 > kantharos/kantharos$$i.txt ; \
	done  

prepare-kantharos:
	cut -f2,3,4,6 < Kantharos.utf8.txt | sed -e 's/L \([0-9]\)	/L 0\1	/g' > Kantharos.prepared.txt

publish-ipa:
	mkdir -p ${DIR}/ipa
	cp ipa/*.txt ${DIR}/ipa/

publish-img:
	cp *.png ${DIR}
	cp favicon.ico ${DIR}
